﻿@{
    Layout = null;
}
@model System.Data.DataTable
<!DOCTYPE html>
<html>
<head>
    <title>年度扶持资金说明表</title>
    @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    @Html.DevExpress().GetStyleSheets(
                new StyleSheet { ExtensionType = ExtensionType.GridView, Theme = DevExpressHelper.Theme }

    )
    @Html.DevExpress().GetScripts(
                    new Script { ExtensionType = ExtensionType.ListBox }
    )
    <script type="text/javascript">

        function OnBeginCallback(s, e) {
            e.customArgs["command"] = e.command;
            var NSRMC = $("#hNSRMC").val();
            var FFinance = $("#hFFinance").val();
            var NSRBM = $("#hNSRBM").val();
            var NSRSBH = $("#hNSRSBH").val();
            // var FNewEnterprise = $("#hFNewEnterprise").val();
              var FIssueID = $("#hFIssueID").val();
            //  var ISPAY = $("#hISPAY").val();
            var FYear = $("#hFYear").val();
            //            var BTJEA = $("#hBTJEA").val();
            //            var BTJEB = $("#hBTJEB").val();
            //            var FApplyDate = $("#hFApplyDate").val();
            //            var LastPayDate = $("#hLastPayDate").val();
            //            var ISBASE = $("#hISBASE").val();
            //            var FFileNo = $("#hFFileNo").val();
            //            var SKSJA = $("#hSKSJA").val();
            //            var SKSJB = $("#hSKSJB").val();

            //            var FNote = $("#hFNote").val();
            //            var FPayDateBegin = $("#hFPayDateBegin").val();
            //            var FPayDateEnd = $("#hFPayDateEnd").val();

            e.customArgs["NSRMC"] = NSRMC;
            e.customArgs["FFinance"] = FFinance;
            e.customArgs["NSRBM"] = NSRBM;
            e.customArgs["NSRSBH"] = NSRSBH;
            // e.customArgs["FNewEnterprise"] = FNewEnterprise;
             e.customArgs["FIssueID"] = FIssueID;
            //  e.customArgs["ISPAY"] = ISPAY;
            e.customArgs["FYear"] = FYear;
            //            e.customArgs["BTJEA"] = BTJEA;
            //            e.customArgs["BTJEB"] = BTJEB;
            //            e.customArgs["FApplyDate"] = FApplyDate;
            //            e.customArgs["LastPayDate"] = LastPayDate;
            //            e.customArgs["ISBASE"] = ISBASE;
            //            e.customArgs["FFileNo"] = FFileNo;
            //            if (SKSJA != null && SKSJA != "") {
            //                e.customArgs["SKSJA"] = parseInt(SKSJA) * 10000;
            //            }
            //            if (SKSJB != null && SKSJB != "") {
            //                e.customArgs["SKSJB"] = parseInt(SKSJB) * 10000;
            //            }
        }


        //查询
        function search() {
            $("#hNSRMC").val(NSRMC1.GetText());
            $("#hFFinance").val(FFinance1.GetValue());
            $("#hNSRBM").val(NSRBM1.GetText());
            $("#hNSRSBH").val(NSRSBH1.GetText());
            //  $("#hFNewEnterprise").val(FNewEnterprise1.GetValue());
              $("#hFIssueID").val(FIssueID1.GetText());
            //  $("#hISPAY").val(ISPAY1.GetChecked());
            $("#hFYear").val(FYear1.GetText());

            //   $("#hBTJEA").val(BTJEA1.GetText());



            //               $("#hBTJEB").val(BTJEB1.GetText());

            //            if (FApplyDate1.GetDate() != null) {
            //                $("#hFApplyDate").val(FApplyDate1.GetText());
            //            }
            //            if (LastPayDate1.GetDate() != null) {
            //                $("#hLastPayDate").val(LastPayDate1.GetText());
            //            }

            //            $("#hISBASE").val(ISBASE1.GetChecked());
            //            $("#hFFileNo").val(FFileNo1.GetText());
            //            $("#hSKSJA").val(SKSJA1.GetText());
            //            $("#hSKSJB").val(SKSJB1.GetText());


            $("#hsearched").val("T");
            gvEditing.Refresh();
        }


        //重置
        function undo() {
            //            NSRMC.SetText("");
            //            NSRBM.SetText("");
            //            NSRSBH.SetText("");
            //            FYear.SetText("");
            // ISPAY1.SetChecked(false);
            FFinance1.SetValue("");
            //   FNewEnterprise1.SetValue("");
            //            FAmount1.SetText("");
            //            FAmount2.SetText("");
            //            FFileNo1.SetText("");
            //            FNote1.SetText("");
            //            FPayDateBegin1.SetText("");
            //            FPayDateEnd1.SetText("");

          
        }

        function MenuTop_emClick(source, e) {
            switch (e.item.name) {
                case "btnExcel":
                    {
                        if ($("#hsearched").val() == "T") {
                            //if (CheckValues())
                            form_query.target = '_self';
                            form_query.action = rootPath + "/QueryYearSummarySheet/ExportToXls";
                            form_query.submit();
                        }
                        break;


                    }
                case "btnReport":
                    {

                        //if (CheckValues())
                        // window.open('page1.html', 'newwindow');
                        if ($("#hsearched").val() == "T") {
                            window.showModalDialog(rootPath + "/QueryYearSummarySheet/Print", window, "dialogWidth=800px;dialogHeight=500px");
                        }
                        //                          
                        //                        form_query.target = 'poppage';
                        //                        form_query.action = rootPath + "/QueryYearSummarySheet/Print";
                        //                        form_query.submit();
                        break;


                    }
                case "btnGridShow":
                    {
                        gvEditing.ShowCustomizationWindow();
                        break;
                    }
		
            }
        }
        function keyPress() {
            if (event.keyCode && event.keyCode == 13) {
                search();

            }

        }
    </script>
</head>
<body  onkeypress="keyPress()">
    @using (Html.BeginForm("ExportToXls", "QueryYearSummarySheet", FormMethod.Post, new { id = "form_query" }))
    {
        @Html.DevExpress().Menu(settings =>
       {
           settings.Name = "toolBarMenu";
           settings.ItemAutoWidth = false;
           settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
           settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
           settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
           settings.Items.Add(item =>
           {
               item.Name = "btnExcel";
               item.Text = "导出Excel";
               item.Image.Url = Url.Content("~/Content/ControlImages/excel.png");
           });
           settings.Items.Add(item =>
           {
               item.Name = "btnReport";
               item.Text = "打印";
               item.Image.Url = Url.Content("~/Content/icons/print.png");
           });

           settings.Items.Add(item =>
           {
               item.Name = "btnGridShow";
               item.Text = "选择列";
               item.Image.Url = Url.Content("~/Content/FunctionImages/AllowanceFileAudit.png");
           });
	
           settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
           settings.ItemLinkMode = ItemLinkMode.ContentBounds;
       }).GetHtml()
        
        <table class="query" width="800px" style="margin-left: auto; margin-right: auto">
            <tr>
                <td align="right" style="text-align: right">
                    纳税人名称:
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
            {
                settings.Name = "NSRMC1";
                settings.Width = System.Web.UI.WebControls.Unit.Pixel(130);
            }).Bind(ViewBag.nsrmc).GetHtml()
                </td>
                <td align="right" style="text-align: right">
                    纳税人编码:
                </td>
                <td>
                    <table>
                        <tr>
                            <td>
                                @Html.DevExpress().TextBox(settings =>
            {
                settings.Name = "NSRBM1";
                settings.Width = System.Web.UI.WebControls.Unit.Pixel(130);
            }).Bind(ViewBag.NSRBM).GetHtml()
                            </td>
                        </tr>
                    </table>
                </td>
                <td align="right" style="text-align: right">
                    纳税人识别号:
                </td>
                <td>
                    <table>
                        <tr>
                            <td>
                                @Html.DevExpress().TextBox(settings =>
      {
          settings.Name = "NSRSBH1";
          settings.Width = System.Web.UI.WebControls.Unit.Pixel(130);
      }).Bind(ViewBag.NSRSBH1).GetHtml()
                            </td>
                        </tr>
                    </table>
                </td>
                <td>
                    @Html.DevExpress().Button(settings =>
           {
               settings.Name = "btnSearch";
               settings.Text = "查询";
               settings.ControlStyle.CssClass = "button";
               settings.Images.Image.Url = Url.Content("~/Content/ControlImages/search.png");
               settings.ClientSideEvents.Click = "search";
           }).GetHtml()
                </td>
                <td>
                    @Html.DevExpress().Button(settings =>
           {
               settings.Name = "btnUndo";
               settings.Text = "重置";
               settings.ControlStyle.CssClass = "button";
               settings.Images.Image.Url = Url.Content("~/Content/ControlImages/undo_blue.png");
               settings.ClientSideEvents.Click = "undo";
           }).GetHtml()
                </td>
            </tr>
            <tr>
                <td align="right" style="text-align: right">
                    年度:
                </td>
                <td>
                    
                                @Html.DevExpress().TextBox(settings =>
      {
          settings.Name = "FYear1";
          settings.Width = System.Web.UI.WebControls.Unit.Pixel(130);
      }).Bind(ViewData["year"]).GetHtml()
                           
                </td>
                <td align="right" style="text-align: right">
                    期号：
                </td>
                <td>
                    <table>
                        <tr>
                            <td>
                                @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FIssueID1";
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(130);
               }).Bind(ViewBag.FIssueID).GetHtml()
                            </td>
                        </tr>
                    </table>
                </td>
                <td align="right" style="text-align: right">
                    特殊调整类型:
                </td>
                <td>
                    <table>
                        <tr>
                            <td>
                                @Html.DevExpress().ComboBox(settings =>
           {
               settings.Name = "FFinance1";
               settings.Width = System.Web.UI.WebControls.Unit.Pixel(130);
               settings.Properties.TextField = "FSpecialAdjustName";
               settings.Properties.ValueField = "FSpecialAdjustClsNo";
               settings.Properties.IncrementalFilteringMode = IncrementalFilteringMode.StartsWith;
               settings.Properties.DropDownStyle = DropDownStyle.DropDown;
               //settings.Properties.ClientSideEvents.SelectedIndexChanged = "Changed";

           }).BindList(ViewData["FinancePropList"]).Bind(ViewBag.FFinance).GetHtml()
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        @Html.Partial("QueryYearSummarySheetListPartial", Model)
    

        @Html.Hidden("hNSRMC", "");
        @Html.Hidden("hFFinance", "");
        @Html.Hidden("hNSRBM", "");
        @Html.Hidden("hNSRSBH", ""); 
        @Html.Hidden("hFNewEnterprise", "");
        @Html.Hidden("hFIssueID", "");
        @Html.Hidden("hISPAY", "");
        @Html.Hidden("hFYear", ViewData["year"]);
        @Html.Hidden("hBTJEA", "");
        @Html.Hidden("hBTJEB", "");
        @Html.Hidden("hFApplyDate", "");
        @Html.Hidden("hLastPayDate", "");
        @Html.Hidden("hISBASE", "");
        @Html.Hidden("hFFileNo", "");
        @Html.Hidden("hSKSJA", ViewData["se"]);
        @Html.Hidden("hSKSJB", "");
              @Html.Hidden("hsearched", "F")                    
    }
</body>
</html>
